<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>mergeProps</title>
</head>

<body>
    <div id="app">
        <Home></Home>
        <hr/>
        <Book></Book>
    </div>
</body>

<script src="./js/vue.global.js"></script>
<script>
    const { createApp,h, mergeProps,cloneVNode } = Vue

    // const one = {
    //     class: 'foo',
    //     onClick: () => {
    //         console.log(1)
    //     }
    // }

    const vNodeDiv = h("div",{
        style:"width:200px;height:200px;background-color:red"
    },"我是div1");

    const vNodeDiv2 = cloneVNode(vNodeDiv,{
        class:"cls",
        style:"background-color:blue"
    })

    const Home = {
        render(){
            return vNodeDiv
        }
    }

    const Book = {
        render(){
            return vNodeDiv2;
        }
    }
      
    const app = createApp({
        components:{Home,Book},
        data() {
            return {
            }
        }
    })

    app.mount('#app')
</script>

</html>